public class Main {
    public static void main(String[] args) {
        AbstractPhone lPhone;
        AbstractPad lPad;
        AbstractCar lCar;
        AbstractWatch lWatch;

        IAbstractproductsFactory productsFactory = new Factoryhuawei();

        lPhone = productsFactory.createPhone();
        lPad = productsFactory.createPad();
        lCar = productsFactory.createCar();
        lWatch = productsFactory.createWatch();

        lPhone.prepare();
        System.out.println(lPhone.getType());

        lPad.prepare();
        System.out.println(lPad.getType());

        lCar.prepare();
        System.out.println(lCar.getType());

        lWatch.prepare();
        System.out.println(lWatch.getType());
    }
}
